import httpInstance from '@/utils/http'

export const getDetailAPI = (id) => {
  return httpInstance({
    url: '/goods',
    method: 'GET',
    params: {
      id
    }
  })
}

// 获取热榜区商品数据
/**
 *
 * @param {*} id 商品id
 * @param {*} type 1代表24小时热销榜 2代表周热销榜
 * @param {*} limit 获取个数
 * @returns
 */
export const getDetailHotAPI = ({ id, type, limit = 3 }) => {
  return httpInstance({
    url: '/goods/hot',
    params: {
      id,
      type,
      limit
    }
  })
}
